import { reactive } from 'vue';

const formState = reactive<{
  /**
   * 车牌号
   */
  plateNo: string;
  /**
   * 申请原因
   */
  note: string;
  /**
   * 车辆图片
   */
  carPicUrl?: string;
}>({
  plateNo: '',
  note: '',
  carPicUrl: '',
});

const formRules = {
  plateNo: [{ required: true, message: '请输入车牌号码' }],
  note: [{ required: true, message: '请输入申请原因' }],
};

const state = reactive<{
  /**
   * 车牌号是否完整
   */
  pass: boolean;
  /**
   *  车牌输入法
   */
  isHide: boolean;
  /**
   * 审批流程配置图结构体
   */
  flowGraphAddFlow?: FlowPathTemplateApi.FlowGraph;
}>({
  pass: false,
  isHide: false,
  flowGraphAddFlow: {},
});

export { formState, formRules, state };
